<!doctype html>
        <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
        <!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
        <!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
        <!--[if gt IE 8]><!--> <html lang="en-US"> <!--<![endif]-->
        <head>
                <!-- META TAGS -->
                <meta charset="UTF-8" />
                <meta name="viewport" content="width=device-width, initial-scale=1.0">

                <title>Knowledge Base Theme</title>

                <link rel="shortcut icon" href="images/favicon.png" />


                

                <!-- Style Sheet-->
                <link rel="stylesheet" href="style.css"/>
                <link rel='stylesheet' id='bootstrap-css-css'  href='css/bootstrap5152.css?ver=1.0' type='text/css' media='all' />
                <link rel='stylesheet' id='responsive-css-css'  href='css/responsive5152.css?ver=1.0' type='text/css' media='all' />
                <link rel='stylesheet' id='pretty-photo-css-css'  href='js/prettyphoto/prettyPhotoaeb9.css?ver=3.1.4' type='text/css' media='all' />
                <link rel='stylesheet' id='main-css-css'  href='css/main5152.css?ver=1.0' type='text/css' media='all' />
                <link rel='stylesheet' id='custom-css-css'  href='css/custom5152.html?ver=1.0' type='text/css' media='all' />
				<link rel='stylesheet' href="css/no-show.css" />
                <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
                <!--[if lt IE 9]>
                <script src="js/html5.js"></script></script>
                <![endif]-->

        </head>

        <body>
        	       
				<br /><br />
				
				
                <div id="app" style="margin:0 auto; width:400px;  text-align:center;"> 
                	
                	<table  style="text-align:center;vertical-align:middle; width: 400px; height: 100px; ">
									
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label  form="nickName">昵称： </label>
										</td>
									</tr>
									
									<tr>
										
										<td>                                                              
											<input v-model="userNickname" type="text" name="nickName" id="nickName" class="required input-xlarge" value="" >
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label form="sex">性别： </label>
										</td>
										<td>      
										<input v-model="userSex" type="radio" name="sex" value="男" ><span form="sex">&nbsp;&nbsp;&nbsp;&nbsp;男</span>
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input v-model="userSex" type="radio" name="sex" value="女" ><span form="sex">&nbsp;&nbsp;&nbsp;&nbsp;女</span>
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label form="birth">出生日期： </label>
										</td>
										<td>                                                              
											<input  v-model="userBrithday" type="text" name="birth" id="birth" class="required input-xlarge" value="" >
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label form="phon">手机号码： </label>
										</td>
										<td>                                                              
											<input v-model="userDeviceNumber" type="text" name="phon" id="phon" class="required input-xlarge" value="" >
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label form="birth">密保问题1： </label>
										</td>
										<td>    
											<select v-model="userQuestionOne" name="que1" id="que1" style="width: 285px; height: 35px;"	>  
												<option value="您父亲姓名？">您父亲姓名？</option> 
												<option value="您母亲姓名？">您母亲姓名？</option> 
												<option value="您孩子姓名？">您孩子姓名？</option> 
											</select>
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label form="ans1">密保答案1： </label>
										</td>
										<td>                                                              
											<input v-model="userAnswerOne" type="text" name="ans1" id="ans1" class="required input-xlarge" value="" >
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px;">
											<label form="birth">密保问题2： </label>
										</td>
										<td>    
											<select v-model="userQuestionTwo"  name="que2" id="que2" style="width: 285px; height: 35px;">  
												<option value="您小学学校的校名？">您小学学校的名称？</option> 
												<option value="您中学学校的校名？">您中学学校的名称？</option> 
												<option value="您大学学校的校名？">您大学学校的名称？</option>
											</select>
										</td>
									</tr>
									<tr>
										<td style="width: 100px; height: 50px; ">
											<label form="ans2">密保答案2： </label>
										</td>
										<td>                                                              
											<input v-model="userAnswerTwo" type="text" name="ans2" id="ans2" class="required input-xlarge" value="" >
										</td>
									</tr>
									
								</table>
								<table  style="text-align:center;vertical-align:middle; width: 400px; height: 100px; ">
									<tr>
										
										<td  style="width: 300px; height: 50px;">
											<input @click="upd" class="btn" name="submit" type="submit" id="submit"  value="修改" style="width: 150px;">
										</td>
										
									</tr>
								</table>
								
                </div>
               

                <!-- script -->
                 <script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
                <script type='text/javascript' src='js/jquery.easing.1.34e44.js?ver=1.3'></script>
                <script type='text/javascript' src='js/prettyphoto/jquery.prettyPhotoaeb9.js?ver=3.1.4'></script>
                <script type='text/javascript' src='js/jquery.liveSearchd5f7.js?ver=2.0'></script>
				<script type='text/javascript' src='js/jflickrfeed.js'></script>
                <script type='text/javascript' src='js/jquery.formd471.js?ver=3.18'></script>
                <script type='text/javascript' src='js/jquery.validate.minfc6b.js?ver=1.10.0'></script>
                <script type='text/javascript' src='js/custom5152.js?ver=1.0'></script>
                <script type="text/javascript" src="js/url.js"></script>
				<script type="text/javascript" src="js/vue(1).js"></script>
				<script type="text/javascript" src="js/axios.min.js"></script>
				<script>
					var vue = new Vue({
						el: '#app', //挂载点
						data: {
							userName:'',
							userPassword1:'',
							userPassword2:'',
							userNickname:'',
							userSex:'',
							userDeviceNumber:'',
							userQuestionOne:'',
							userQuestionTwo:'',
							userAnswerOne:'',
							userAnswerTwo:'',
							userBrithday:'',
							userId:''
							
						},
						created: function() {
							this.init();
						},
						methods: {
							//查所有
							upd: function() {
								var self = this;
								self.userId = window.sessionStorage.getItem("userId");
									var param=new URLSearchParams();	
									param.append('userSex',self.userSex);
									param.append('userDeviceNumber',self.userDeviceNumber);
									param.append('userQuestionOne',self.userQuestionOne);
									param.append('userQuestionTwo',self.userQuestionTwo);
									param.append('userAnswerOne',self.userAnswerOne);
									param.append('userAnswerTwo',self.userAnswerTwo);
									param.append('userBrithday',self.userBrithday);
									param.append('userId',self.userId);
									axios
									.post(web_server+"update/user",param)
										.then(function(response) {
											//var object =JSON.stringify(response)
											var objects= response.data;
											if(objects.status == 200) {
												var object = objects.data
													self.list= object;
													alert(objects.message);
													//this.moun;
													//self.list.size=self.commentLenght;
													//console.log(self.list[0].commentList)
											}else if(objects.status == 500){
												alert(objects.message)
											}
										})
									.catch(function(error) {
										alert(error)
										
									});
								
							},
							init: function(){
								var self = this;
								self.userId = window.sessionStorage.getItem("userId");
									var param=new URLSearchParams();	
									param.append('userId',self.userId);
									axios
									.post(web_server+"query/user/id",param)
										.then(function(response) {
											//var object =JSON.stringify(response)
											var objects= response.data;
											if(objects.status == 200) {
												var object = objects.data
													self.list= object;
													console.log(object);
												self.userNickname = object.userNickname ;
												self.userSex = object.userSex  ;
												self.userDeviceNumber = object.userDeviceNumber ;
												self.userQuestionOne = object.userQuestionOne;
												self.userQuestionTwo = object.userQuestionTwo ;
												self.userAnswerOne = object.userAnswerOne ;
												self.userAnswerTwo = object.userAnswerTwo ;
												self.userBrithday = object.userBrithday ;
											}else if(objects.status == 500){
												alert(objects.message)
											}
										})
									.catch(function(error) {
										alert(error)
										
									});
							}
							
						}
					})
				</script>
        </body>
</html>

